<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      let a = 200;
      function f1() {
        let x = 100;
        console.log("修改前x", x);
        x = 200;
        console.log("修改后x", x);
        a = 300;
        console.log("函数内部修改a", a);
      }
      f1();

      a = 600;
      console.log("外部修改a", a);
    </script>
  </body>
</html>
